<?php

namespace app\admin\behavior;

use app\admin\model\Permission as PermissionModel;

class AuthCheck
{
    public function moduleInit(&$params)
    {
//        print_r(request()->header());
//        echo request()->module();
        $c = strtolower(request()->controller());
        $a = strtolower(request()->action());
//        $permission_id = PermissionModel::field('id')->where(['controller'=>$c])
//            ->where(['action'=>$a])->find();
//        echo($permission_id);
//        echo $c;
//        echo $a;
        return true;
    }
}